package com.boyon.common.status;

import java.util.ArrayList;
import java.util.List;

import com.boyon.common.domain.Value;

/**
 * ClassName:LimitType <br/>
 * Function: 限制类型. <br/>
 * Date: 2018年3月14日 下午10:46:06 <br/>
 * 
 * @author sunshulin
 * @version
 * @since JDK 1.8
 * @see
 */
public enum LimitType {

	infinite(0, "文无限次"), one(1, "一次");

	private Integer val;

	private String desc;
	
	private static List<Value> list = new ArrayList<>();

	static {
		list.add(new Value(LimitType.infinite.val, LimitType.infinite.desc));
		list.add(new Value(LimitType.one.val, LimitType.one.desc));
	}

	/**
	 * Creates a new instance of LimitType.
	 * 
	 * @param status
	 * @param desc
	 */
	private LimitType(Integer val, String desc) {
		this.val = val;
		this.desc = desc;
	}

	/**
	 * status.
	 * 
	 * @return the status
	 * @since JDK 1.8
	 */
	public Integer getVal() {
		return val;
	}

	/**
	 * desc.
	 * 
	 * @return the desc
	 * @since JDK 1.8
	 */
	public String getDesc() {
		return desc;
	}
	
	/**
	 * list.
	 * 
	 * @return the list
	 * @since JDK 1.8
	 */
	public static List<Value> getList() {
		return list;
	}
}
